#pragma once


#include "resource.h"
class CactivenewDlg;
struct TResult
{
	int m_total;
	int m_time;
	int m_size;
};
struct TFtp
{
	CString m_Name;
	CString m_Pass;
	CString m_Server;
};
class AccessNet
{
public:

public:
	AccessNet(void);
	~AccessNet(void);

public:
	bool UpLoadFtpFile(TFtp &aServer, CString aUrl, CString aFile, TResult &aRst, CactivenewDlg *m_pDlg =NULL);
	bool DownLoadFtpFile(TFtp &aServer, CString aUrl, CString aFile, TResult &aRst, CactivenewDlg *m_pDlg =NULL);
	bool DoHttpPost(CString aActionData, CString &aRst);
	bool DoHttpGet(CString aUrl, CString aFile, CString &aRst,CString &aAgent);
	bool CheckFtpServer_icmp(TFtp &aFtp,CString &aLocalIp,CString &aAgent);
	bool CheckFtpServer_updn(TFtp &aFtp,CString &aLocalIp,CString &aAgent);
	bool DoParseFtpUrl(TFtp &aFtp, CString aUrl);
	bool UpDateRst(CString &aRst, TResult aDnRst,TResult aUpRst);
	//bool DoLocalIp(CString &aIp,CString &aRst);
};
